[MIRROR] APC charging state update for power cord feeders #986
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Original PR: Skyrat-SS13/Skyrat-tg#25432
About The Pull Request
Synthetics can be fed from the APC through the power cable implant.
The thing is, if the APC is fully charged at the time, its status will be stuck at [fully charged] at the moment of power cord disconnecting and won't update to [charging] until someone unlocks the APC with a card and switches the charging mode, or something changes state of external power to the APC.
Instead of fiddling with apc_main.dm, I've added a simple check at the very end of the power cord feed loop that will check the status of the APC's external power and change its state to [charging] right when the power cord is unplugged. If for some reason there is no external power, the status will not change.
This could probably be done in a more elegant way, but it works.
How This Contributes To The Skyrat Roleplay Experience
Synthetic lizards can now accumulate those sweet joules without fear of frowning disapproval from the engineering team.
And without the risk of leaving some potentially important area of the station without power.
Proof of Testing
Screenshots/Videos
1.mp4
2.mp4
Changelog
🆑 vorpal-void
fix: yeah here we go, APC recharging, mission accomplished.
code: power_cord.dm, whooping 4 lines of code.
/:cl: